class math{
    constructor(num = 0) {
        this.num = num
    }

    add(...args) {
        this.num += args.reduce((a, b) => a + b)
        return this
    }
    minus(...args) {
        this.num -= args.reduce((a, b) => a + b)
        return this
    }
    times(timer){
        this.num = timer * this.num;
        return this;
    }
}
const math2 = new math()
console.log(math2.add(2, 4).minus(3).times(3));
